<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="renderer" content="webkit">
    <title>修改密码页面</title>
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/layui.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/view.css}"/>
    <link rel="stylesheet" th:href="@{/assets/jquery-upload/css/jquery.fileupload-ui.css}" />
    <link rel="stylesheet" th:href="@{/assets/jquery-upload/css/jquery.fileupload.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/css_x/percenter/common.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/css_x/percenter/percenter.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/css_x/centro/pintuer.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/css_x/centro/admin.css}"/>
    <script type="text/javascript" th:src="@{/js/js_x/fondo/jquery.js}"></script>
    <script type="text/javascript" th:src="@{/js/js_x/reservation/pintuer.js}"></script>
    <script type="text/javascript" th:src="@{/assets/layui.js}"></script>
</head>
<body>
<input type="hidden" id = "judge" th:value="${flag}">
<div style="height: 100px; width: 100%;border-bottom: solid 1px black;">
    <div style="margin-left: 12%; margin-top: 2%;"><img th:src="@{/images/img_x/download.png}"/>
        <h4 style="font-size: 16px; margin-left: 80%; color: black; "><a th:href="@{/f/t/showmain}">返回首页 </a>&nbsp;|
            &nbsp;<a th:href="@{/f/u/withdraw}">退出</a></h4>
    </div>
</div>

<div class="container" id="app">
    <div class="content">
        <div class="main">
            <div class="info-content clearfix">
                <div class="user-profile-nav">
                    <h1>个人中心</h1>
                    <a href="order_form.html" th:href="@{/f/u/PCB_Reveal}"  class="orders ">我的订单</a>
                    <a th:href="@{/f/u/percenter}"  class="orders ">基本信息</a>
                </div>
                <div class="profile-container">
                    <div class="profile-title">
                        修改密码
                    </div>


                    <div class="panel admin-panel">
                        <div class="panel-head"><strong>修改密码</strong></div>
                        <div class="body-content">
                            <form method="post" class="form-x" th:action="@{/f/u/updatepassword}" style="margin-left: 35%; width: 120%;">
                                <div id="sc">

                                </div>
                                <div class="form-group">
                                    <div class="label">
                                        <label>用户名称：</label>
                                    </div>
                                    <div class="field">
                                        <input type="text" class="input w50" th:value="${userName}" name="userName" onfocus=this.blur()>
                                        <div class="tips"></div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="label">
                                        <label>旧密码：</label>
                                    </div>
                                    <div class="field">
                                        <input type="password" class="input w50" value="" name="password"
                                               data-validate="required:请输入密码"/>
                                        <div class="tips"></div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="label">
                                        <label>新密码：</label>
                                    </div>
                                    <div class="field">
                                        <input id="sc1" type="password" class="input w50" value="" name="passwordX"
                                               data-validate="required:请输入密码"/>
                                        <div class="tips"></div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="label">
                                        <label>再次确认密码：</label>
                                    </div>
                                    <div class="field">
                                        <input id="sc2" type="password" class="input w50" value="" name="passwordX1"
                                               data-validate="required:请确认密码"/>
                                        <div class="tips"></div>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="label">
                                        <label></label>
                                    </div>
                                    <div class="field">
                                        <button class="button bg-main" type="submit" onclick="pwd()"> 提交</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script th:src="@{/assets/layui.all.js}"></script>
<script type="text/javascript" th:src="@{/assets/jquery-upload/vendor/jquery.ui.widget.js}"></script>
<script type="text/javascript" th:src="@{/assets/jquery-upload/jquery.iframe-transport.js}"></script>
<script type="text/javascript" th:src=" @{/assets/jquery-upload/jquery.fileupload.js}"></script>
<script type="text/javascript">
    $(function () {
        if ($("#judge").val() == 3) {
            layer.msg("密码错误")
            /*$("#sc").append("<div style='color: red ;text-align: center' ><i></i><span>密码错误!</span></div>")*/
        }else if ($("#judge").val() == 4){
            layer.msg("两次输入不一致")
           /* $("#sc").append("<div style='color: red ;text-align: center' ><i></i><span>两次输入不一致</span></div>")*/
        }
    });
</script>
</html>
